﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style TargetType="DataGridCell" x:Key="CellStyle">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type DataGridCell}">
					<Grid Background="{TemplateBinding Background}">
						<ContentPresenter VerticalAlignment="Center" Margin="5" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="DataGridColumnHeader" x:Key="ColumnHeaderStyle" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
		<Setter Property="Padding" Value="10"/>
		<Setter Property="Background" Value="Lavender"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="SeparatorVisibility" Value="Visible"/>
		<Setter Property="SeparatorBrush" Value="#FFC9CACA"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="DataGridColumnHeader">
					<Grid Background="{TemplateBinding Background}">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Border Padding="{TemplateBinding Padding}">
							<ContentPresenter  />
						</Border>
						<Image x:Name="SortFlag" Width="16" Height="16" Grid.Column="1" />
						<Thumb x:Name="PART_RightHeaderGripper" Grid.Column="2" Width="2" BorderThickness="2"
								   BorderBrush="{TemplateBinding SeparatorBrush}" Cursor="SizeWE" />
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="SortDirection" Value="Descending">
							<Setter TargetName="SortFlag" Property="Source" Value="/Albatross.Resources;component/Images/down.png"/>
						</Trigger>
						<Trigger Property="SortDirection" Value="Ascending">
							<Setter TargetName="SortFlag" Property="Source" Value="/Albatross.Resources;component/Images/up.png"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="DataGridRowHeader" x:Key="RowHeaderStyle" BasedOn="{StaticResource {x:Type DataGridRowHeader}}">
		<Setter Property="Width" Value="22"/>
		<Setter Property="Background" Value="Lavender"/>
		<Setter Property="BorderBrush" Value="Silver"/>
		<Setter Property="BorderThickness" Value="0 0 0 1"/>
	</Style>

	<Style TargetType="DataGrid" x:Key="DataGridStyle" BasedOn="{StaticResource {x:Type DataGrid}}">
		<Setter Property="HorizontalGridLinesBrush" Value="Silver"/>
		<Setter Property="VerticalGridLinesBrush" Value="Silver"/>
		<Setter Property="RowHeaderWidth" Value="20"/>
		<Setter Property="Margin" Value="2 0 2 2"/>
		<Setter Property="CellStyle" Value="{StaticResource CellStyle}"/>
		<Setter Property="ColumnHeaderStyle" Value="{StaticResource ColumnHeaderStyle}"/>
		<Setter Property="RowHeaderStyle" Value="{StaticResource RowHeaderStyle}"/>
	</Style>
</ResourceDictionary>